Question: Convex hexagon $ABCDEF$ has exactly two distinct side lengths. Side $AB$ measures 5 units, and side $BC$ measures 6 units. The perimeter of hexagon $ABCDEF$ is 34 units. How many sides of hexagon $ABCDEF$ have measure 6 units?
Explanation: If all sides measured $6$ units, the total perimeter would be $36$.  But this is $2$ too many units, so we must change two of these sides to $5$ units.  Thus $\boxed{4}$ sides measure $6$ units.